<!--
 * @Author: 宋杰
 * @Date: 2021-03-16 22:27:31
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-03-16 22:48:33
 * @Description: 一家十一口(猜一字)左下
-->
<template>
  <div class="divBox">
    <!-- 标签 -->
    <div class="titleBox">
      <div>各产品当日(户数、余额&投放)</div>
    </div>
    <div>
      <div class="right_Box">
        <div class="right_Box_1">
          <!-- <div>查询条件</div> -->
          <div class="right_Box_1_btn">
            <div :class="bthShow == 1 ? 'btnColor' : 'btnColor2'">京东</div>
            <div :class="bthShow == 2 ? 'btnColor' : 'btnColor2'">蚂蚁</div>
            <div :class="bthShow == 3 ? 'btnColor' : 'btnColor2'">小米</div>
            <div :class="bthShow == 4 ? 'btnColor' : 'btnColor2'">滴滴</div>
            <div :class="bthShow == 5 ? 'btnColor' : 'btnColor2'">度小满</div>
            <div :class="bthShow == 6 ? 'btnColor' : 'btnColor2'">自营</div>
          </div>

          <div class="right_Box_2">
            <div>
              <div></div>
              <div>当日投放户数</div>
            </div>
            <div>
              <div></div>
              <div>昨日同比</div>
            </div>
          </div>
        </div>
        <div class="right_Box_3">
          <div>
            <div>下载</div>
          </div>
          <div class="right_Box_3_tu">
            <div>
              <Secondleft1 v-if="bthShow == 1" />
              <Secondleft2 v-if="bthShow == 2" />
              <Secondleft3 v-if="bthShow == 3" />
              <Secondleft4 v-if="bthShow == 4" />
              <Secondleft5 v-if="bthShow == 5" />
              <Secondleft6 v-if="bthShow == 6" />
            </div>
            <div>
              <Secondright1 v-if="bthShow == 1" />
              <Secondright2 v-if="bthShow == 2" />
              <Secondright3 v-if="bthShow == 3" />
              <Secondright4 v-if="bthShow == 4" />
              <Secondright5 v-if="bthShow == 5" />
              <Secondright6 v-if="bthShow == 6" />
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Secondleft1 from "./secondleft1"; //第2行 右下图
import Secondleft2 from "./secondleft2"; //第2行 右下图
import Secondleft3 from "./secondleft3"; //第2行 右下图
import Secondleft4 from "./secondleft4"; //第2行 右下图
import Secondleft5 from "./secondleft5"; //第2行 右下图
import Secondleft6 from "./secondleft6"; //第2行 右下图
import Secondright1 from "./secondright1"; //第2行 左下图
import Secondright2 from "./secondright2"; //第2行 左下图
import Secondright3 from "./secondright3"; //第2行 左下图
import Secondright4 from "./secondright4"; //第2行 左下图
import Secondright5 from "./secondright5"; //第2行 左下图
import Secondright6 from "./secondright6"; //第2行 左下图
export default {
  components: {
    Secondleft1,
    Secondleft2,
    Secondleft3,
    Secondleft4,
    Secondleft5,
    Secondleft6,
    Secondright1,
    Secondright2,
    Secondright3,
    Secondright4,
    Secondright5,
    Secondright6,
  },
  name: "",
  data() {
    return {
      bthShow: 0, //按钮切换
    };
  },
  //监听属性 类似于data概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {
    this.btnClick();
  },
  //方法集合
  methods: {
    // 按钮切换
    btnClick() {
      this.bthShow++;
      setTimeout(() => {
        if (this.bthShow == 6) {
          this.bthShow = 0;
        }
        this.btnClick();
      }, 5000);
    },
  },
};
</script>
<style lang="scss" scoped>
.divBox {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  > :nth-child(2) {
    flex: 1;
    width: 100%;
    // border: 1px solid #fff;
  }
}
.titleBox {
  font-family: PingFangSC-Regular;
  font-size: 0.3rem;
  color: #75bdff;
  letter-spacing: 0.015rem;
  text-align: left;
  line-height: 0.5rem;
  height: 0.5rem;
  width: 100%;
  background: url("../../assets/heng2.png") no-repeat;
  background-size: 6rem 40%;
  background-position: left 0 bottom 0;
  margin-bottom: 0.05rem;
}
.right_Box {
  width: 100%;
  height: 100%;
  // border: 1px solid #75bdff;
  // margin-top: 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  > :nth-child(1) {
    // border: 1px solid #75bdff;
    width: 100%;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;

    font-family: AlibabaPuHuiTiR;
    font-size: 0.275rem;
    color: #75bdff;
    letter-spacing: 0;
    // 按钮 "京东\借呗\小米\滴滴\度小满\自营"
    .right_Box_1_btn {
      flex: 1;
      height: 100%;
      display: flex;
      align-items: center;
      margin-left: 0.2rem;
      > div {
        // flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 1.2rem;
        height: 0.4rem;
        margin-right: 0.2rem;
        background: url("../../assets/xitbk.png") no-repeat;
        background-size: 100% 100%;
        color: #1cd3f3;
        background-color: rgba($color: #0e454d, $alpha: 1);
        // cursor: pointer;
      }
    }
    .right_Box_2 {
      // border: 1px solid #fff;
      flex: 0.6;
      height: 100%;
      display: flex;
      align-items: center;
      flex-direction: column;
      justify-content: center;
      font-family: AlibabaPuHuiTiR;
      font-size: 0.225rem;
      color: #ffffff;
      letter-spacing: 0;
      line-height: 18px;
      > div {
        display: flex;
        align-items: center;
      }
      > :nth-child(1) {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        margin-bottom: 0.2rem;
        > :nth-child(2) {
          flex: 1;
          // border: 1px solid #fff;
          display: flex;
          align-items: center;
          width: 100%;
          height: 100%;
        }
        > :nth-child(1) {
          border-radius: 0.02rem;
          width: 0.4rem;
          height: 0.15rem;
          background: #00e2ff;
          margin-right: 0.2rem;
        }
      }
      > :nth-child(2) {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        margin-bottom: 0.2rem;
        > :nth-child(2) {
          flex: 1;
          // border: 1px solid #fff;
          display: flex;
          align-items: center;
          width: 100%;
          height: 100%;
        }

        > :nth-child(1) {
          border-radius: 0.02rem;
          width: 0.4rem;
          height: 0.15rem;
          background: #ff4e6f;
          margin-right: 0.2rem;
        }
      }
    }
  }
  > :nth-child(2) {
    // border: 1px solid #fff;
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0.2rem;
    > :nth-child(1) {
      display: flex;
      width: 1.2rem;
      height: 100%;
      > div {
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: flex-end;
        width: 1.2rem;
        height: 0.4rem;
        margin-right: 0.2rem;
        background: url("../../assets/xitbk.png") no-repeat;
        background-size: 100% 100%;
        color: #1cd3f3;
        background-color: rgba($color: #0e454d, $alpha: 1);
        cursor: pointer;
      }
    }
    .right_Box_3_tu {
      flex: 1;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      > div {
        // border: 1px solid #fff;
        flex: 1;
        height: 100%;
        > :nth-child(1) {
          display: flex;
          align-items: center;
          justify-content: center;
          width: 100%;
          height: 100%;
        }
      }
    }
  }
}
// 按钮切换颜色
.btnColor {
  background-color: #00e2ff !important;
  color: #0e454d !important;
}
.btnColor2 {
  background-color: none !important;
  color: #00e2ff !important;
}
</style>
